import request from '@/utils/request';

export default {
    /**
     * 条件+模糊+分页查询司机信息
     * @param {司机查询VO对象} driverQueryVO 
     * @returns 
     */
    getPage(driverQueryVO){
        return request({
            url: `/driver/page`,
            method: 'post',
            data: driverQueryVO
        })
    },
    /**
     * 根据司机ID查询对象
     * @param {司机信息} driver 
     * @returns 
     */
    updateDriverById(driver){
        return request({
            url: `/driver`,
            method: 'put',
            data: driver
        })
    },
    /**
     * 根据司机Ids查询对象
     * @param {司机Ids} driverIds 
     */
    deleteDriverByIds(driverIds){
        return request({
            url: `/driver`,
            method: 'delete',
            data: driverIds
        })
    },
    /**
     * 添加新司机
     * @param {司机信息} driver 
     */
    addDriver(driver){
        return request({
            url: `/driver`,
            method: 'post',
            data: driver
        })
    },
    /**
     * 获取所有的司机信息
     */
    getList(){
        return request({
            url: `/driver`,
            method: 'get',
        })
    }
}

